package com.lanou3g.myapplication.activity.singleton.activity;

import android.content.Intent;
import android.text.Html;
import android.util.Log;
import android.widget.TextView;

import com.lanou3g.myapplication.DayNightMode;
import com.lanou3g.myapplication.R;
import com.lanou3g.myapplication.bean.BeanData;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by dllo on 16/1/16.
 */
public class DetalisImageTextActivity extends BaseActivity {
    private TextView textView;
    private ArrayList<BeanData> data;
    private int position;

    @Override
    protected int setLayout() {
        return R.layout.activity_detalis_image_text;
    }

    @Override
    protected void initView() {


//        data = new ArrayList<>();
        textView = (TextView) findViewById(R.id.detalis_image_text_tv);
//        data.get()
        Intent intent = getIntent();
        data = (ArrayList<BeanData>) intent.getSerializableExtra("data");
        position = intent.getIntExtra("position", 0);
        Log.d("DetalisImageTextActivit", "position:" + position + "**" + data);
        String content = data.get(position).getContent();
        textView.setText(Html.fromHtml(content));
    }

    @Override
    protected void initData() {

    }
}
